package com.luoguijia.disk.spring.security;

import com.luoguijia.disk.mybatis.entity.PtUserEntity;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

public class UserDiskEntity extends User {
    /**
     * 用户编码
     */
    private String userUuid;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 手机号
     */
    private String mobile;

    /**
     * 昵称
     */
    private String niceName;

    public UserDiskEntity(PtUserEntity userEntity, Collection<? extends GrantedAuthority> authorities) {
        super(userEntity.getUserName(), userEntity.getPassword(), authorities);
        this.email = userEntity.getEmail();
        this.mobile = userEntity.getMobile();
        this.niceName = userEntity.getNiceName();
        this.userUuid = userEntity.getUserUuid();

    }

    public String getUserUuid() {
        return userUuid;
    }

    public void setUserUuid(String userUuid) {
        this.userUuid = userUuid;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getNiceName() {
        return niceName;
    }

    public void setNiceName(String niceName) {
        this.niceName = niceName;
    }

}
